using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataModels.Models
{
    public partial class ReceivedSM
    {
        public ReceivedSM()
        {
            this.ReportDatas = new List<ReportData>();
        }

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ReceivedSMSNo { get; set; }

        [Required]
        [StringLength(100)]
        public string SenderNum { get; set; }

        [Required]
        [StringLength(999)]
        public string TxtDetails { get; set; }

        public Nullable<System.DateTime> DateReceived { get; set; }
        public Nullable<bool> Processed { get; set; }

        [Required]
        [StringLength(50)]
        [Column(TypeName = "varchar")]
        [ForeignKey("Facility")]
        public string FacCode { get; set; }

        public Nullable<int> Year { get; set; }
        public Nullable<int> Period { get; set; }

        [ForeignKey("Report")]
        public Nullable<int> RepID { get; set; }
        
        public Nullable<System.DateTime> ReportDate { get; set; }
        
        [StringLength(1000)]
        public string Comments { get; set; }
        
        public virtual Facility Facility { get; set; }
        public virtual Report Report { get; set; }
        public virtual List<ReportData> ReportDatas { get; set; }
    }
}
